<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActiveScaffold::DataStructures::ActionColumns</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActiveScaffold::DataStructures::ActionColumns</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/active_scaffold/lib/data_structures/action_columns_rb.html">
                vendor/plugins/active_scaffold/lib/data_structures/action_columns.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="Set.html">
                Set
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
A set of columns. These structures can be nested for organization.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000363">add_subgroup</a>&nbsp;&nbsp;
      <a href="#M000364">include?</a>&nbsp;&nbsp;
      <a href="#M000365">initialize_copy</a>&nbsp;&nbsp;
      <a href="#M000362">label</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="../Configurable.html">ActiveScaffold::Configurable</a></span>
      </div>
    </div>

    <div id="section">

    <div id="class-list">
      <h3 class="section-bar">Classes and Modules</h3>

      Module <a href="ActionColumns/AfterConfiguration.html" class="link">ActiveScaffold::DataStructures::ActionColumns::AfterConfiguration</a><br />

    </div>




    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">action</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
this lets us refer back to the action responsible for this link, if it
exists. the immediate need here is to get the crud_type so we can
dynamically filter columns from the set.

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">collapsed</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
Whether this column set is collapsed by default in contexts where
collapsing is supported

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">label</td>
          <td class="context-item-value">&nbsp;[W]&nbsp;</td>
          <td class="context-item-desc">
labels are useful for the Create/Update forms, when we display columns in a
grouped fashion and want to name them separately

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000363" class="method-detail">
        <a name="M000363"></a>

        <div class="method-heading">
          <a href="#M000363" class="method-signature">
          <span class="method-name">add_subgroup</span><span class="method-args">(label, &amp;proc)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
nests a subgroup in the column set
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000363-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000363-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/data_structures/action_columns.rb, line 20</span>
20:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_subgroup</span>(<span class="ruby-identifier">label</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">proc</span>)
21:       <span class="ruby-identifier">columns</span> = <span class="ruby-constant">ActiveScaffold</span><span class="ruby-operator">::</span><span class="ruby-constant">DataStructures</span><span class="ruby-operator">::</span><span class="ruby-constant">ActionColumns</span>.<span class="ruby-identifier">new</span>
22:       <span class="ruby-identifier">columns</span>.<span class="ruby-identifier">configure</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">proc</span>
23:       <span class="ruby-identifier">columns</span>.<span class="ruby-identifier">label</span> = <span class="ruby-identifier">label</span>
24:       <span class="ruby-identifier">columns</span>.<span class="ruby-identifier">action</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">action</span>
25:       <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">columns</span>
26:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000364" class="method-detail">
        <a name="M000364"></a>

        <div class="method-heading">
          <a href="#M000364" class="method-signature">
          <span class="method-name">include?</span><span class="method-args">(item)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000364-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000364-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/data_structures/action_columns.rb, line 28</span>
28:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include?</span>(<span class="ruby-identifier">item</span>)
29:       <span class="ruby-ivar">@set</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
30:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">c</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">item</span>
31:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">item</span>.<span class="ruby-identifier">to_sym</span>
32:       <span class="ruby-keyword kw">end</span>
33:       <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
34:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000362" class="method-detail">
        <a name="M000362"></a>

        <div class="method-heading">
          <a href="#M000362" class="method-signature">
          <span class="method-name">label</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000362-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000362-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/data_structures/action_columns.rb, line 12</span>
12:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">label</span>
13:       <span class="ruby-identifier">as_</span>(<span class="ruby-ivar">@label</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@label</span>
14:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000365" class="method-detail">
        <a name="M000365"></a>

        <div class="method-heading">
          <a href="#M000365" class="method-signature">
          <span class="method-name">initialize_copy</span><span class="method-args">(from)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
called during clone or dup. makes the clone/dup deeper.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000365-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000365-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/data_structures/action_columns.rb, line 39</span>
39:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize_copy</span>(<span class="ruby-identifier">from</span>)
40:       <span class="ruby-ivar">@set</span> = <span class="ruby-identifier">from</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@set'</span>).<span class="ruby-identifier">clone</span>
41:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>